define(['text!service/warrantyCard2.html'],
	function(viewTemplate) {
		return Piece.View.extend({
			id: 'service_warrantyCard2',
			events: {
				"click #submit": "submit",
			},
			render: function() {
				$(this.el).html(viewTemplate);

				Piece.View.prototype.render.call(this);
				return this;
			},
			onShow: function() {
				//write your business logic here :)


				var windowHeight = $(window).height();
				var elTop = $("#warrantyCard2").offset().top;
				var elHeight = windowHeight - elTop;

				console.info(elHeight);
				$("#warrantyCard2").css({
					"height": elHeight
				});
				new iScroll($("#warrantyCard2")[0]);
			},
			submit: function() {


				this.container.navigateForResult('/service/partsDetail', {
					trigger: true
				}, 'service/warrantyCard2', this.onGotResult);
			},
		}); //view define

	});